<?php
/**
 * Category Select
 *
 * @category   Cms
 * @package    Cms_Form
 */
class Cms_Form_Catalog_Category_Select extends BIS_Form_Abstract
{
    public function init()
    {
        
        $categories = $this->getModel()->getCategories();
        $cats = array();
        $cats[NULL] = ' --- None --- ';
        foreach($categories as $category) {
            $cats[$category['categoryId']] = $category['name'];
        }

        $this->addElement('select', 'categoryId', array(
            'label' => 'Select Category',
            'filters' => array('Int'),
            'decorators' => array('ViewHelper','Label'),
            'multiOptions' => $cats
        ));
    }
}
